﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace eLoan.Models
{
    [Table("LoanPaymentSchedule")]
    public class LoanPaymentSchedule : LoanPaymentScheduleFields
    { }

    public class LoanPaymentScheduleQueryModel : LoanPaymentScheduleFields
    {
        [Display(Name = "Charge Type")]
        [StringLength(100)]
        public string ChargeTypeName { get; set; }
    }

    public class LoanPaymentScheduleFields
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        [Display(Name = "ID")]
        public int ID { get; set; }

        [Required]
        [Display(Name = "Document No")]
        [StringLength(50)]
        public string DocumentNo { get; set; }

        [Display(Name = "Scheduled Amount")]
        public decimal ScheduledAmount { get; set; }

        [Display(Name = "Charge Type ID")]
        public int? ChargeTypeID { get; set; }

        [Display(Name = "Other Charges")]
        public decimal OtherCharges { get; set; }

        [Display(Name = "Due Date")]
        public DateTime DueDate { get; set; }

        [Display(Name = "Due Amount")]
        public decimal DueAmount { get; set; }

        [Display(Name = "Cheque Details")]
        [StringLength(100)]
        public string ChequeDetails { get; set; }

        [Display(Name = "Due Remarks")]
        [StringLength(200)]
        public string DueRemarks { get; set; }
    }

}